import express from 'express';
import { CollegeController } from '../controllers/collegeController.js';
import { authenticateToken } from '../middleware/auth.js';

const router = express.Router();
const collegeController = new CollegeController();

// 获取学院列表
router.get('/', collegeController.getColleges.bind(collegeController));

// 获取学院选项数据
router.get('/options', collegeController.getCollegeOptions.bind(collegeController));

// 获取学院统计信息
router.get('/stats/overview', collegeController.getCollegeStats.bind(collegeController));

// 获取学院详情
router.get('/:id', collegeController.getCollegeDetail.bind(collegeController));

// 创建学院
router.post('/', collegeController.createCollege.bind(collegeController));

// 更新学院
router.put('/:id', collegeController.updateCollege.bind(collegeController));

// 删除学院
router.delete('/:id', collegeController.deleteCollege.bind(collegeController));

export default router;